<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<script type="text/javascript">
	$(document).ready(function(){
		//禁用自动过滤样式
		KindEditor.options.filterMode = false;
		KindEditor.options.minWidth=700;
		$("#pic_up_iconBig").upload({
			"uploader":"systemAccess/deal_pic.do",
			"fileSizeLimit":512000,
			"fileTypeExts":"*.jpg;*.png;*.gif;*.mpg",
			"multi":false,
			"buttonText":"上传图片",
			"onUploadSuccess": upload_iconBig_callback,
			"icon":"cloud-upload"
		});

		$("#pic_up_iconSmall").upload({
			"uploader":"systemAccess/deal_pic.do",
			"fileSizeLimit":512000,
			"fileTypeExts":"*.jpg;*.png;*.gif;*.mpg",
			"multi":false,
			"buttonText":"上传图片",
			"onUploadSuccess": upload_iconSmall_callback,
			"icon":"cloud-upload"
		});
	});
	
	function upload_iconBig_callback(file, data) {
	    var json = $.parseJSON(data);
	    $(this).bjuiajax('ajaxDone', json);
	    if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
	        $('#iconBig').val(json.filename);
	        $('#iconBig_span_pic').html('已上传图片：<img src="'+ json.filename +'" width="100">');
	    }
	}
	function upload_iconSmall_callback(file, data) {
	    var json = $.parseJSON(data);
	    $(this).bjuiajax('ajaxDone', json);
	    if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
	        $('#iconSmall').val(json.filename);
	        $('#iconSmall_span_pic').html('已上传图片：<img src="'+ json.filename +'" width="100">');
	    }
	}
	
</script>
<div class="bjui-pageContent">
	<form action="topic/save.do" id="systemaccess_form" data-toggle="validate" data-alertmsg="false">
		<input type="hidden" name="systemAccessId">
		<ul style='margin-top: 10px;margin-bottom: 10px;'>
			<li style='float:left;margin-bottom: 10px;'>
	       		<div style="width:400px;">
	       			<label for="l_systemName" class="control-label x120">系统名称：</label>
	       			<input type="text" name="systemName" id="l_systemName" value="" data-rule="required;length[~50];jsvalide" size="20">
	       		</div>
	       	</li>
			<li style='float:left;margin-bottom: 10px;'>
	       		<div style="width:400px;">
	       			<label for="l_systemId" class="control-label x120">系统编号：</label>
	       			<input type="text" name="systemId" id="l_systemId" data-toggle="spinner" data-rule="number;jsvalide" size="20">
	       		</div>
	       	</li>
	       	<li style='float:left;margin-bottom: 10px;'>
	       		<div style="width:800px;">
	       			<label for="l_accessUrl" class="control-label x120">访问地址：</label>
	       			<input type="text" name="accessUrl" id="l_accessUrl" data-rule="required;length[~200]" size="60">
	       		</div>
	       	</li>
			<li style='float:left;margin-bottom: 10px;'>
	       		<div style="width:400px;">
	       			<label for="l_width" class="control-label x120">宽度：</label>
	       			<input type="text" name="width" id="l_width" data-rule="required;number" size="20">
	       		</div>
	       	</li>
			<li style='float:left;margin-bottom: 10px;'>
	       		<div style="width:400px;">
	       			<label for="l_height" class="control-label x120">高度：</label>
	       			<input type="text" name="height" id="l_height" data-rule="required;number" size="20">
	       		</div>
	       	</li>
	       	<li style='float:left;margin-bottom: 10px;'>
	       		<div style="width:400px;">
	       			<label for="l_showIndex" class="control-label x120">显示顺序：</label>
	       			<input type="text" name="showIndex" id="l_showIndex" value="0" data-toggle="spinner" data-rule="required;number;jsvalide" size="20">
	       		</div>
	       	</li>
			<li style='float:left;margin-bottom: 10px;'>
	       		<div style="width:400px;">
	       			<label for="l_height" class="control-label x120">权限模式：</label>
	       			<select name="permissionType" id="l_p_type" data-toggle="selectpicker" data-width="200" >
                       	<option value="1"  selected="selected">集中管理</option>
						<option value="2">独立管理</option>
                    </select>
	       		</div>
	       	</li>
			<li style='float:left;margin-bottom: 10px;'>
	       		<div style="width:400px;">
	       			<label for="l_pic_iconBig" class="control-label x120">系统图标(大)：</label>
	       			<div style="display:inline-block; vertical-align:middle;">
	       				<div id="pic_up_iconBig"></div>
						<input type="hidden" name="iconBig" value="" id="iconBig">
						<span id="iconBig_span_pic">(48x48)</span>
					</div>
	       		</div>
	       	</li>
			<li style='float:left;margin-bottom: 10px;'>
	       		<div style="width:400px;">
	       			<label for="l_pic_iconSmall" class="control-label x120">系统图标(小)：</label>
	       			<div style="display:inline-block; vertical-align:middle;">
	       				<div id="pic_up_iconSmall"></div>
						<input type="hidden" name="iconSmall" value="" id="iconSmall">
						<span id="iconSmall_span_pic">(32x32)</span>
					</div>
	       		</div>
	       	</li>
		</ul>
    </form>
</div>
<div class="bjui-pageFooter">
	<ul>
		<li><button type="button" class="btn btn-red cancel" data-icon="remove">取消</button></li>
		<li><button type="button" class="btn btn-default save" data-icon="save">保存</button></li>
	</ul>
</div>